package com.pf.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

@ConfigurationProperties(prefix = "custom.pf")
public class CustomProperties {

    private List<UrlDTO> urls;

    public List<UrlDTO> getUrls() {
        return urls;
    }

    public void setUrls(List<UrlDTO> urls) {
        this.urls = urls;
    }

    public static class UrlDTO {
        private String httpMethod;
        private String url;
        private Integer timeout;

        public String getHttpMethod() {
            return httpMethod;
        }

        public void setHttpMethod(String httpMethod) {
            this.httpMethod = httpMethod;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public Integer getTimeout() {
            return timeout;
        }

        public void setTimeout(Integer timeout) {
            this.timeout = timeout;
        }

        @Override
        public String toString() {
            return "UrlDTO{" +
                    "httpMethod='" + httpMethod + '\'' +
                    ", url='" + url + '\'' +
                    ", timeout=" + timeout +
                    '}';
        }
    }


}
